@extends('admin.master')
<script src="/js/admin/reminders.js"></script>
@section('title', '滤芯寿命提醒')
	
@section('firstItem')
				<span>滤芯寿命提醒</span>
				<input class="a_indexbg" type="hidden" value="reminders" />
@stop
@section('searchList')
@parent
		<a class="queryBoxBtn filterQueryBtn">搜索</a>
				<div><input class="chargeQueryInput" type="text" placeholder="输入用户名或设备编号" value="" /></div>

@stop
				
@section('dataTables')
@parent
			<table class="filterWarn dataTables" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<td>序号</td>
						<td>设备编号</td>
						<td>用户名</td>
						<!-- <td>剩余流量</td> -->
						<td>滤芯1</td>
						<td>滤芯2</td>
						<td>滤芯3</td>
						<td>滤芯4</td>
						<td>滤芯5</td>
						<td>记录时间</td>
						<td>水机用户</td>
						<td>用户电话</td>
						<td>是否已提醒用户</td>
					</tr>
				</thead>
				<tbody>
					@for($i=0, $remindersCount=count($remind_records); $i<$remindersCount; $i++)
					<tr >
						<td>{{ $i+1 }}</td>
						<td class="devicecodeVal">{{ $remind_records[$i]->device->code }}</td>
						<td>{{ $remind_records[$i]->device->installInfo->customer_name or '尚未录入' }}</td>
						<!-- @if($remind_records[$i]->residual_flow < 100)
						<td class="warnBg">
						@else
						<td>
						@endif
						{{ $remind_records[$i]->residual_flow }}L</td> -->
						@for($j=1; $j<6; $j++)
							<input type="hidden" value="{{ $filter = 'filter'.$j }}" />
							@if($remind_records[$i]->$filter < 15)
						<td class="warnBg">
							@else
							<td>
							@endif
							{{ $remind_records[$i]->$filter }}%</td>
						@endfor
						<td>{{ $remind_records[$i]->created_at }}</td>
						<td>
						@for($j=0, $userInfoCount=count($remind_records[$i]->device->userInfos);$j<$userInfoCount; $j++)
								{{ $remind_records[$i]->device->userInfos[$j]->name }}
							@if($j<$userInfoCount-1)
								、
							@endif
						@endfor
						</td>
						<td>{{ $remind_records[$i]->device->installInfo->phone or '尚未录入' }}</td>
						<td><input type="hidden" value="{{ $remind_records[$i]->id }}" />
						@if($remind_records[$i]->filter_status)
						<span class="checkedBox checkedBoxBg"></span>
						@else
						<span class="checkedBox"></span>
						@endif
						</td>
					</tr>
					@endfor
				</tbody>
			</table>
@stop
@section('page_num')
<ul class="pagination pagination-lg"> 
	{!! $remind_records->render() !!}
</ul>
@stop

@section('infor_promit')
@parent
<div class="checkHintBoxBg remindersBoxBg">
	<div class="remindersBox checkHintBox">
		<p class="titleTxt">是否已提醒用户</p>
		<div style="padding-top: 30px;">是否已与水机用户电话联系，说明水机目前的滤芯状态</div>
		<label class="labelBox remindersLabelBox"></label>
		<div>
			<a class="yesBtn filterYesBtn">是</a>
			<a class="noBtn filterNoBtn">否</a>
		</div>
	</div>
</div>
@stop
